#shader vertex
#version 330 core
layout( location = 0 ) in vec4 position;
layout( location = 1 ) in vec2 texCoords;

out vec2 v_uv;

uniform mat4 u_mvp; //matrix view

void main(){
    v_uv = texCoords;
    gl_Position = u_mvp * position;

}


#shader fragment
#version 330 core
layout (location=0) out vec4 outColor;

in vec2 v_uv;
uniform vec4 u_color;
uniform sampler2D u_texture;

void main(){
    vec4 color = texture( u_texture, v_uv );
    outColor = color* u_color;
    //outColor = vec4( 1.0 );
}
